package com.wang.di.core.handler;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

//注解解释器
// T：宿主类，A：对应的注解
public abstract class AnnoHandler<A> {

    public static Map<Class<? extends Annotation>, AnnoHandler<?>> HANDLER_MAP = new HashMap<>();

    // 处理字段
    public Object field(Object instance, Class<?> clz, Field field, A anno) throws Exception {
        throw new Exception();
    }

    public JustMethodProxy method(Object instance, Class<?> clz, Method method, A anno) throws Exception {
        throw new Exception();
    }
}
